package com.ecloud.common.base.result;

import java.io.Serializable;
import java.util.List;

/**
 * 多行数据对象
 * 
 * @author LiuGangQiang Create in 2020/03/01
 */
public final class Rows<T> implements Serializable {
    private static final long serialVersionUID = -6214930546489414126L;

    /**
     * 总记录数
     *
     * @author LiuGangQiang Create in 2020/03/01
     */
    private Long total;

    /**
     * 数据结果集
     *
     * @author LiuGangQiang Create in 2020/03/01
     */
    private List<T> rows;

    /**
     * 午餐构造器
     *
     * @author LiuGangQiang Create in 2021/08/19
     */
    public Rows() {
    }

    /**
     * 构造器
     *
     * @author LiuGangQiang Create in 2020/03/01
     * @param total 总记录数
     * @param rows  数据结果集
     */
    protected Rows(Long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    /**
     * @return the total
     */
    public Long getTotal() {
        return total;
    }

    /**
     * @param total the total to set
     */
    public void setTotal(Long total) {
        this.total = total;
    }

    /**
     * @return the rows
     */
    public List<T> getRows() {
        return rows;
    }

    /**
     * @param rows the rows to set
     */
    public void setRows(List<T> rows) {
        this.rows = rows;
    }

}
